// https://bugs.llvm.org/show_bug.cgi?id=39356

#include <stdlib.h>

struct array {
    int count;  // first field must be present to trigger issue
    int *nodes;
};

// arr must not be an automatic variable, but a parameter or global.
void array_insert(struct array *arr) {
    struct array arr2;
    arr2.nodes = calloc(1, sizeof(int));
    free(arr->nodes);
    *arr = arr2;
    arr->nodes[0] = 1; // false-positive.c:14:19: warning: Use of memory after it is freed
}
